- remote = local_assigns.fetch(:remote, false)
- search = params[:search]
- show_empty_search = @topics.empty? && search

- if show_empty_search
  = render ::Layouts::EmptyResultComponent.new(type: :search)
- else
  = render ::Layouts::CrudComponent.new(_('Topics'),
    icon: 'overview',
    count: @topics.count,
    options: { class: 'gl-mt-5' }) do |c|
    - c.with_body do
      %ul.content-list
        = render partial: 'shared/topics/topic', collection: @topics
      = paginate_collection @topics, remote: remote
